Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support overwrite/skip folder download #516

Merged
merged 6 commits into from
Feb 6, 2024

Conversation

congminh1254
Copy link
Member

@congminh1254 congminh1254 commented Jan 30, 2024

Closes: #125

Scenarios:

  • By default, the overwrite flag set to true.
  • If overwrite, CLI will download and overwrite existing files, and skip the file have in local but not in remote.
  • If no-overwrite flag set to true, max-depth set default to max.
  • If no-overwrite and max-depth=max it will go through all the folder and subfolder to find the file exist on remote but not in local (check by file name only) and download missing file.
  • If no-overwrite and max-depth=root, it will only scan in the root folder to check if missing file or folder and download it.

@coveralls
Copy link

coveralls commented Jan 30, 2024

Pull Request Test Coverage Report for Build 7798578400

  • -4 of 30 (86.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on support-overwrite-skip at 86.538%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/commands/folders/download.js 26 30 86.67%
Totals Coverage Status
Change from base Build 7738285303: 86.5%
Covered Lines: 4185
Relevant Lines: 4683

💛 - Coveralls

src/commands/folders/download.js Outdated Show resolved Hide resolved
src/commands/folders/download.js Show resolved Hide resolved
src/commands/folders/download.js Show resolved Hide resolved
src/commands/folders/download.js Outdated Show resolved Hide resolved
'--depth=0',
'--token=test',
])
.it('should not overwrite existing file and folder in root folder when --no-overwrite and --max-depth=root flag is passed', async(ctx) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can remove --max-depth=root

Copy link
Contributor

@arjankowski arjankowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@congminh1254 congminh1254 merged commit 300f914 into main Feb 6, 2024
13 checks passed
@congminh1254 congminh1254 deleted the support-overwrite-skip branch February 6, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Box Folder Download Overwrite/Ignore
3 participants